﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WomanMotion.WebApi.Model.Dtos.Classify;

namespace WomanMotion.WebApi.Model.Entitys
{
    /// <summary>
    /// 订阅消息推送
    /// </summary>
    [SugarTable("SendMessage", TableDescription = "订阅消息推送")]
    public class SendMessage : BaseEmpty
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public long Userid { get; set; }

        /// <summary>
        ///用户
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(Userid))]
        public Users? Users { get; set; } //不能赋值只能是null

        /// <summary>
        /// 比赛Id
        /// </summary>
        public long Matchid { get; set; }

        /// <summary>
        ///比赛对象
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(Matchid))]
        public Match? Match { get; set; } //不能赋值只能是null

        /// <summary>
        /// 比赛时间
        /// </summary>
        public DateTime Matchtime { get; set; }

        /// <summary>
        /// 是否推送;0代表未推送，1代表推送
        /// </summary>
        public long Issend { get; set; }
    }
}